To ensure the integrity of data within processing environments, locking techniques are employed that enable data access to be controlled. For example, locks are used to prevent one process from accessing the data being updated by another process.
Traditional locking techniques use a lock bit to control access to the data. When a process desires access, it tests the lock bit, and if it is set, the process loops waiting for the lock bit to be reset. This is true for data that is being read, as well as data being updated. Such a technique is referred to as loop while locked.
With loop while locked techniques, if the process performing an update is delayed, hangs up or stops, other processes waiting to read or update the information must loop. Thus, without special handling, referred to as lock recovery, a process may loop forever waiting for the lock bit to be turned off. This is a particularly serious problem for environments that require very frequent access to the data.